Add a unstable --ignore-local-config flag#8652
Add a unstable --ignore-local-config flag#8652phil-opp wants to merge 1 commit intorust-lang:masterfrom
--ignore-local-config flag#8652Conversation
|
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
|
The |
Thanks, posted #8653 with a fix. |
2e7e076 to
8b87e30
Compare
|
Thanks! Rebased to rerun CI with your fix. |
|
The Cargo team discussed this at our meeting, and we think that something of this nature should probably go through the RFC process. There are a number of issues with how Cargo discovers the config files to load, and we don't want to incrementally add small changes that would accumulate to something complex and difficult to work with. The comment at #7894 (comment) contains links to related issues, which would be a good place to start collecting all the different use cases and problems (and the following comments have more detail). Perhaps you and @jsgf could maybe collaborate on that? |
|
Thanks for your comment! I took a look at the linked issues/proposals and tried to categorize and summarize them: https://internals.rust-lang.org/t/problems-of-cargo-config-files-and-possible-solutions/12987 |
|
Closing this in favor of #9030 and the proposal in https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336. An |
This adds a new unstable
--ignore-local-configflag to all subcommands that makes cargo ignore all.cargo/configfiles except for the config file in the user's home directory (similar to the behavior ofcargo install). This is useful because some config values cannot be reset through command line parameters, e.g. thebuild.targetflag. See #8643 for more motivation.This is the first time that I'm adding new command line parameters to
cargo, so please let me know if I'm doing something wrong.Fixes #8643